<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/views/include/top.jsp" %>
<form id="form" action="j_spring_security_check" method="post">
	<div class="sub">
		<div class="sub_left">
			<%-- <div class="left_tit">
				<img src="${imgUrl}/left_tit.jpg" border="0" />
			</div> --%>
			<ul>
				<c:forEach var = "menu" items="${menuList}">
					<li><a href="#" onClick="goBoardListMain(<c:out value="${menu.menuIndex}" />)"><c:out value="${menu.menuName}" /></a></li>				
				</c:forEach>
			</ul>
		</div>
		<div class="sub_content">
			<div class="title">
				<div class="tit"><img src="${imgUrl}/login_tit.jpg" border="0" /></div>
				<div class="home">HOME > <font color="#4a7ed5">로그인</font></div>
			</div>
			<div class="content">
				<div class="login">
					<div class="login_txt"><img src="${imgUrl}/login_txt.jpg" border="0" /></div>
					<div class="id_pw">
							<ul>
								<li class="id"><input type="text" name="j_username" id="j_username" style="width:180px;"></li>
								<li class="pw"><input type="password" name="j_password" onkeypress="return runScript(event)" style="width:180px;"></li>
							</ul>
						<div class="login_btn"><input type="image" id="" src="${imgUrl}/login_btn.jpg" onclick="javascript:doLogin();"/></div>
					</div>
					<div class="btn">
						<ul>
							<li><a href="/user/join1"><img src="${imgUrl}/login_btn2.jpg" border="0" /></a></li>
							<li style="font-size:11px;"><a href="javascript:findId();" style="color:#B2B2B2">아이디 찾기</a>/<a href="javascript:findPw();"  style="color:#B2B2B2">비밀번호 찾기</a></li>
						</ul>
					</div>
				</div>
			</div>
		</div>
	</div>
<script type="text/javascript">
function init(){
	$('#j_username').focus();	
}
function runScript(e) {
    if (e.keyCode == 13) {
    	doLogin();
        return false;
    }
}
function doLogin() {
	
	$('#form').submit();
	return;
}

function goBoardListMain(type) {		
	$("#menuIndex").val(type);
	var url = "/board/boardListMain";	
	
	$("#frm").attr("action", url);
	$("#frm").attr("method", "post");
	$("#frm").submit();		
	
	
	return false;
}

var findId = function(){
	window.open('/pass/forgotId', "아이디 찾기", "width=440, height=250, toolbar=no, menubar=no, scrollbars=no, resizable=yes");


};


var findPw = function(){
	window.open('/pass/forgotPw', "비밀번호 찾기", "width=440, height=300, toolbar=no, menubar=no, scrollbars=no, resizable=yes");
};

init();
</script>	
</form>
<form  id="frm" name="frm" method="post" style="display:none;">
	<input type="text" name="menuIndex" id="menuIndex">	
</form>
<%@ include file="/WEB-INF/views/include/bottom.jsp" %>